<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>新闻</title>
        <link rel="stylesheet" href="/css/base.css">
        <link rel="stylesheet" href="/css/example_detail.css">
        <link rel="stylesheet" href="/css/swiper.min.css">
        <script src="/js/swiper.min.js"></script>
    </head>
    <body>
        <header class="header">
            <div class="header_wrap">
                <div class="header_logo">
                    <img src="/assets/logo.png" alt="">
                </div>
                <div class="header_link">
                    <div class="header_link_content">
                        <div class="link link_baojia">
                            <img src="/assets/header_link_baojia.png" alt="产品报价">
                            <span>产品报价</span>
                            <div class="header_link_baojia_link">
                                <div class="border-up"><span></span></div>
                                <div style="overflow: hidden;height: 100%;">
                                    <a href="/baojia.html">漆面保护膜</a>
                                    <a href="/baojia.html">车身改色膜</a>
                                </div>
                            </div>
                        </div>
                        <a href="/zhibao.html" class="link">
                            <img src="/assets/header_link_zhibao.png" alt="质保查询">
                            <span>质保查询</span>
                        </a>
                        <a href="" class="link">
                            <img src="/assets/header_link_signin.png" alt="经销商登陆">
                            <span>经销商登陆</span>
                        </a>
                    </div>
                </div>
            </div>
            <div class="header_menu">
                <div class="header_menu_list">
                    <a href="/home.html" class="active">首页</a>
                    <a href="/brand.html">品牌</a>
                    <a href="/product.html">产品</a>
                    <a href="/news.html">资讯</a>
                    <a href="/example.html">案例</a>
                </div>
            </div>
        </header>
        <div class="example_detail_wrap">
            <div class="navigation">
                <a href="/home.html">首页</a>
                <span class="line">></span>
                <a>导航</a>
            </div>
            <div class="toggle" id="toggle">
                <button class="btn" onclick="toggle('toggle-content-video', this)">视频</button>
                <button class="btn active" onclick="toggle('toggle-content-img', this)"> 图片</button>
            </div>
            <div class="info">
                <div class="name">711film</div>
                <p class="desc">还没上牌先保护 全国封存原厂漆  /  想要光芒四射 就要时刻与众不同 不负7待1刀1刻  </p>
                <div class="share"><span>分享到：</span><img src="/assets/example_detail_icon.png" alt=""></div>
            </div>
            <!-- 图片 if-->
            <div class="imgs" id="toggle-content-img" style="display: block;">
                <div class="swiper-container swiper-container-detail">
                    <div class="swiper-wrapper swiper-wrapper-detail">
                        <div class="swiper-slide">
                            <img src="/assets/example_detail_car.png" width="100%">
                        </div>
                        <div class="swiper-slide">
                            <img src="/assets/example_detail_car.png" width="100%">
                        </div>
                        <div class="swiper-slide">
                            <img src="/assets/example_detail_car.png" width="100%">
                        </div>
                        <div class="swiper-slide">
                            <img src="/assets/example_detail_car.png" width="100%">
                        </div>
                        <div class="swiper-slide">
                            <img src="/assets/example_detail_car.png" width="100%">
                        </div>
                        <div class="swiper-slide">
                            <img src="/assets/example_detail_car.png" width="100%">
                        </div>
                    </div>
                </div>
                <span class="btn_prev" onclick="detailPrev()"><img src="/assets/example_detail_icon_left.png" alt=""></span>
                <span class="btn_next" onclick="detailNext()"><img src="/assets/example_detail_icon_right.png" alt=""></span>
                <div class="car_name">
                    <div class="swiper-pagination"></div>
                    <h4>宝马3系  瓷器蓝</h4>
                </div>
            </div>
            <!-- 视频 else-->
            <div class="video" id="toggle-content-video" style="display: none;">
                <div style="width: 100%; height: 510px; text-align: center;">
                    <!-- <iframe src="https://tv.sohu.com/s/sohuplayer/iplay.html?bid=187331546&amp;autoplay=false&amp;disablePlaylist=true" allowfullscreen="true" scrolling="no" width="100%" height="100%" frameborder="0"></iframe> -->
                    <video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" controls="controls" style="width: auto; height: 100%;"></video>
                </div>
                <div class="car_name">
                    <h4>宝马3系  瓷器蓝</h4>
                </div>
            </div>
        </div>
        <footer class="footer">
            <div class="footer_wrap">
                <div class="list">
                    <a href="/baojia.html" class="list_cell">产品报价</a>
                    <a href="/zhibao.html" class="list_cell">质保查询 </a>
                    <a href="" class="list_cell">经销商登陆</a>
                </div>
                <span class="phone">182 0182 5141 </span>
                <span class="email">sm_711film@163.com </span>
                <div class="qrcode">
                    <img src="/assets/footer_qrcode.png" alt="">
                    <p>扫一扫，关注微信小程序</p>
                </div>
            </div>
            <div class="gov">
                Copyright © 2019-2020 711 film, All Rights Reserved
            </div>
        </footer>
        <script>
            var swiperDetail = new Swiper('.swiper-container-detail', {
                speed: 300,
                on: {
                    slideChange: function() {
                        
                    }
                },
                pagination: {
                    el: '.swiper-pagination',
                }
            })

            function detailPrev () {
                swiperDetail.slidePrev()    
            }

            function detailNext () {
                swiperDetail.slideNext()
            }
        </script>
        <script>
            function toggle (contentId, dom) {
                console.log(contentId)
                var btns = [].slice.call(document.getElementById('toggle').querySelectorAll('button'))
                for (var index = 0; index < btns.length; index++) {
                    btns[index].setAttribute('class', 'btn')
                }
                dom.setAttribute('class', 'btn active')
                if (contentId === 'toggle-content-video') {
                    document.getElementById('toggle-content-video').style.display = 'block'
                    document.getElementById('toggle-content-img').style.display = 'none'
                } else if (contentId === 'toggle-content-img') {
                    document.getElementById('toggle-content-video').style.display = 'none'
                    document.getElementById('toggle-content-img').style.display = 'block'
                }
            }
        </script>
    </body>
</html>